package com.rytx.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.rytx.system.mapper.ArtAfterLogMapper;
import com.rytx.system.domain.ArtAfterLog;
import com.rytx.system.service.IArtAfterLogService;

/**
 * 售后操作记录Service业务层处理
 * 
 * @author rytx
 * @date 2024-08-29
 */
@Service
public class ArtAfterLogServiceImpl implements IArtAfterLogService
{
    @Override
    public void createAfterLog(String afterNo, String operate, Long userId, Long userType, Long status) {
        ArtAfterLog artAfterLog = new ArtAfterLog();
        artAfterLog.setAfterNo(afterNo);
        artAfterLog.setOperate(operate);
        artAfterLog.setUserId(userId);
        artAfterLog.setUserType(userType);
        artAfterLog.setStatus(status);
        artAfterLogMapper.insertArtAfterLog(artAfterLog);
    }

    @Autowired
    private ArtAfterLogMapper artAfterLogMapper;

    /**
     * 查询售后操作记录
     * 
     * @param id 售后操作记录主键
     * @return 售后操作记录
     */
    @Override
    public ArtAfterLog selectArtAfterLogById(Long id)
    {
        return artAfterLogMapper.selectArtAfterLogById(id);
    }

    /**
     * 查询售后操作记录列表
     * 
     * @param artAfterLog 售后操作记录
     * @return 售后操作记录
     */
    @Override
    public List<ArtAfterLog> selectArtAfterLogList(ArtAfterLog artAfterLog)
    {
        return artAfterLogMapper.selectArtAfterLogList(artAfterLog);
    }

    /**
     * 新增售后操作记录
     * 
     * @param artAfterLog 售后操作记录
     * @return 结果
     */
    @Override
    public int insertArtAfterLog(ArtAfterLog artAfterLog)
    {
        return artAfterLogMapper.insertArtAfterLog(artAfterLog);
    }

    /**
     * 修改售后操作记录
     * 
     * @param artAfterLog 售后操作记录
     * @return 结果
     */
    @Override
    public int updateArtAfterLog(ArtAfterLog artAfterLog)
    {
        return artAfterLogMapper.updateArtAfterLog(artAfterLog);
    }

    /**
     * 批量删除售后操作记录
     * 
     * @param ids 需要删除的售后操作记录主键
     * @return 结果
     */
    @Override
    public int deleteArtAfterLogByIds(Long[] ids)
    {
        return artAfterLogMapper.deleteArtAfterLogByIds(ids);
    }

    /**
     * 删除售后操作记录信息
     * 
     * @param id 售后操作记录主键
     * @return 结果
     */
    @Override
    public int deleteArtAfterLogById(Long id)
    {
        return artAfterLogMapper.deleteArtAfterLogById(id);
    }
}
